Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge multiple if statements #1120

Closed
wants to merge 4 commits into from

Conversation

zengwei00
Copy link
Contributor

Combine multiple if statements to reduce Duplicate code and improve readability

Copy link

@github-advanced-security github-advanced-security bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

vcs-diff-lint found more than 10 potential problems in the proposed changes. Check the Files changed tab for more details.


return None

Check warning

Code scanning / vcs-diff-lint

Trailing whitespace

Trailing whitespace

return None

Check warning

Code scanning / vcs-diff-lint

Trailing whitespace

Trailing whitespace
try_count += 1
log.error('Downloading error %s: %s (retrying...)', url, str(err))
time.sleep(2 ** try_count)
except Exception as err:

Check warning

Code scanning / vcs-diff-lint

FileDownloader.get: Catching too general exception Exception

FileDownloader.get: Catching too general exception Exception
except requests.exceptions.RequestException as err:
try_count += 1
log.error('Downloading error %s: %s (retrying...)', url, str(err))
time.sleep(2 ** try_count)

Check warning

Code scanning / vcs-diff-lint

FileDownloader.get: Undefined variable 'time'

FileDownloader.get: Undefined variable 'time'
@zengwei00 zengwei00 closed this Jun 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant